package io.renren.modules.sys.customer.service.impl;

import io.renren.modules.sys.customer.dao.BtCustomerSummaryDao;
import io.renren.modules.sys.customer.entity.BtCustomerSummaryEntity;
import io.renren.modules.sys.customer.service.BtCustomerSummaryService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;


@Service("btCustomerSummaryService")
public class BtCustomerSummaryServiceImpl extends ServiceImpl<BtCustomerSummaryDao, BtCustomerSummaryEntity> implements BtCustomerSummaryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<BtCustomerSummaryEntity> page = this.selectPage(
                new Query<BtCustomerSummaryEntity>(params).getPage(),
                new EntityWrapper<BtCustomerSummaryEntity>()
        );

        return new PageUtils(page);
    }
    public BtCustomerSummaryEntity GetOnebyCustId(Long custId){
        return this.selectOne(new EntityWrapper<BtCustomerSummaryEntity>().eq("cust_id",custId));
    }
}
